package com.qf.controller;


import com.qf.pojo.BaseResp;
import com.qf.pojo.Game;
import com.qf.service.PlayAndGameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * 与游戏分类结合，通过分类查询出不同的陪玩的类型
 */
@RestController
@RequestMapping("/gameType")
public class PlayAndGameController {
    @Autowired
    PlayAndGameService playAndGameService;
    /**
     *
     * @param  game  找到前端传过来的游戏类型的id
     * @return
     */
    @RequestMapping(value = "/show",method = RequestMethod.POST)
    public BaseResp show(@RequestBody Game game){

        return playAndGameService.GameType(game.getId());
    }
}
